# 929 简单：独特的电子邮件地址

def numUniqueEmails(emails):
    s = set()
    for i in range(len(emails)):
        name, addr = emails[i].split('@')
        name = name.split('+')[0]
        # print(name.replace('.', '') + '@' + addr)
        s.add(name.replace('.', '') + '@' + addr)
    return len(s)


print(numUniqueEmails(["test.email+alex@leetcode.com","test.e.mail+bob.cathy@leetcode.com","testemail+david@lee.tcode.com"]))
